{include file="common/header"}
<link href="/static/admin/css/other.css" rel="stylesheet">
<main class="lyear-layout-content">
    <div class="container-fluid">
        <div class="row ant-menu-submenu">
            <div class="col-lg-10 col-b90">
                <div class="card">
                    <div class="right-card-header card-header">
                        <h4>{:lang('index.clean')}</h4>
                    </div>
                    <div class="card-body">
                        <div class="example-box set_evaluation">

                            <div class="form-group col-md-12 mt-50">
                                <button type="submit" class="btn btn-default" id="all">{:lang('clean.all')}</button>
                                <button type="submit" class="btn btn-default" id="record">{:lang('clean.record')}
                                </button>
                                <button type="submit" class="btn btn-default" id="user">{:lang('clean.user')}</button>
                            </div>
                            {if $user_switch}
                            <div class="form-group col-md-12 mt-50">
                                <button type="button" class="btn btn-default" id="users">{:lang('clean.users')}</button>
                                <button type="button" class="btn btn-default" id="users_record">{:lang('clean.users_record')}</button>
                            </div>
                            {/if}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
{include file="common/footer"}
<script>
    let IM_config = {
        all: "{:adminUrl('admin/Clean/all')}",
        record: "{:adminUrl('admin/Clean/record')}",
        user: "{:adminUrl('admin/Clean/user')}",
        users: "{:adminUrl('admin/Clean/users')}",
        users_record: "{:adminUrl('admin/Clean/users_record')}",
    };

    $(function () {

        $('#users').click(function () {

            $.ajax({
                type: "post",
                url: IM_config.users,
                dataType: "json",
                success: function (r) {
                    we_im_msg(r.data);
                }
            });
        });

        $('#users_record').click(function () {

            $.ajax({
                type: "post",
                url: IM_config.users_record,
                dataType: "json",
                success: function (r) {
                    we_im_msg(r.data);
                }
            });
        });

        $('#all').click(function () {

            $.ajax({
                type: "post",
                url: IM_config.all,
                dataType: "json",
                success: function (r) {
                    we_im_msg(r.data);
                }
            });
        });
        $('#record').click(function () {

            $.ajax({
                type: "post",
                url: IM_config.record,
                dataType: "json",
                success: function (r) {
                    we_im_msg(r.data);

                }
            });
        });
        $('#user').click(function () {

            $.ajax({
                type: "post",
                url: IM_config.user,
                dataType: "json",
                success: function (r) {
                    we_im_msg(r.data);
                }
            });
        });
    });
</script>
<script type="text/javascript" src="/static/admin/js/set.js"></script>
